<#import "/spring.ftl" as s/>
<@override name="main">
<div id="project_toolbar" art="toolbar">
	<div position="left">
	 <@shiro.hasRole name='Admin'>
		<button id="project_add" text="<@s.message "operation.insert"/>" onclick="project_list.add()"
				icon="add"  tooltip="<@s.message "tip.project.add"/>">
		</button>

	 </@shiro.hasRole>
	</div>
    <div position="right" >
      <@shiro.hasRole name="Admin">
          <button id="project_account_import" text="<@s.message "operation.import_project_account"/>" onclick="project_list.importTeam()"
                  icon="import" disabled="true" tooltip="<@s.message "project.account.import"/>">
          </button>

        <div category="origin">
          <input id="search" name="search" required='false' form_fill="false" type="text" art="textbox"/>
          <input art="button" id="project_search" name="project_search" text="<@s.message "project.search"/>" icon="search" onclick="project_list.fuzzy_search()">
        </div>
      </@shiro.hasRole>
    </div>
</div>
<input id="store_pid_0" type="hidden" name="pid" value=""/>
<div id="project_list">
</div>
<div id="upload_file" style="display: none">
    <form id="import_form" action="<@s.url '/project/account_import'/>" method="post" enctype="multipart/form-data" >
        <input id="store_pid" type="hidden" name="pid" value=""/>
        <table art="form" columns="120,*" autoLabel="true" rightAlign="true" colon="true">
            <tr>
                <td colspan="2" style="background:#fffcef;" title="<@s.message 'account.list.import.file.tip'/>">
                    <@s.message 'project.account.list.import.file.tip.msg'/>
                </td>
            </tr>
            <tr>
                <td>
                    <label art='label' for="attachment" required='true'><@s.message "account.list.import.file"/></label>
                </td>
                <td>
                    <input id="attachment" name="attachment" type="file" required='true'>
                </td>
            </tr>
            <tr>
                <td></td>
                <td align="center">
                    <button id="upload_file_button" type="submit" >
                        <span><span><@s.message 'operation.project.team.import'/></span></span>
                    </button>
                    <span style="width:10px;"></span>
                    <button id="upload_file_cancel" type="button">
                        <span><span><@s.message 'operation.cancel'/></span></span>
                    </button>
                </td>
            </tr>
        </table>
    </form>
</div>

</@override>
<@override name="scripts">
<script type="text/javascript" > 
  var role;
  cdms.common.ajax_get("shiro",function(shi){
  	role = shi;
  });
  var js_param = {
      image_url :'<@s.url '/resources/common/images'/>'
  }
</script>
<script type="text/javascript" src="<@s.url '/resources/scripts/project/list.js'/>"></script>
</@override>
<@extends name="/common/layout.ftl" current="project" title='project.location.list'></@extends>